package com.kgc.sbt.beans;

import java.util.ArrayList;
import java.util.List;

public class CouponsTypeExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Long offset;

    public CouponsTypeExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Long offset) {
        this.offset = offset;
    }

    public Long getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCouponsIdIsNull() {
            addCriterion("coupons_id is null");
            return (Criteria) this;
        }

        public Criteria andCouponsIdIsNotNull() {
            addCriterion("coupons_id is not null");
            return (Criteria) this;
        }

        public Criteria andCouponsIdEqualTo(Integer value) {
            addCriterion("coupons_id =", value, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsIdNotEqualTo(Integer value) {
            addCriterion("coupons_id <>", value, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsIdGreaterThan(Integer value) {
            addCriterion("coupons_id >", value, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("coupons_id >=", value, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsIdLessThan(Integer value) {
            addCriterion("coupons_id <", value, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsIdLessThanOrEqualTo(Integer value) {
            addCriterion("coupons_id <=", value, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsIdIn(List<Integer> values) {
            addCriterion("coupons_id in", values, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsIdNotIn(List<Integer> values) {
            addCriterion("coupons_id not in", values, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsIdBetween(Integer value1, Integer value2) {
            addCriterion("coupons_id between", value1, value2, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsIdNotBetween(Integer value1, Integer value2) {
            addCriterion("coupons_id not between", value1, value2, "couponsId");
            return (Criteria) this;
        }

        public Criteria andCouponsNumIsNull() {
            addCriterion("coupons_num is null");
            return (Criteria) this;
        }

        public Criteria andCouponsNumIsNotNull() {
            addCriterion("coupons_num is not null");
            return (Criteria) this;
        }

        public Criteria andCouponsNumEqualTo(String value) {
            addCriterion("coupons_num =", value, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumNotEqualTo(String value) {
            addCriterion("coupons_num <>", value, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumGreaterThan(String value) {
            addCriterion("coupons_num >", value, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumGreaterThanOrEqualTo(String value) {
            addCriterion("coupons_num >=", value, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumLessThan(String value) {
            addCriterion("coupons_num <", value, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumLessThanOrEqualTo(String value) {
            addCriterion("coupons_num <=", value, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumLike(String value) {
            addCriterion("coupons_num like", value, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumNotLike(String value) {
            addCriterion("coupons_num not like", value, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumIn(List<String> values) {
            addCriterion("coupons_num in", values, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumNotIn(List<String> values) {
            addCriterion("coupons_num not in", values, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumBetween(String value1, String value2) {
            addCriterion("coupons_num between", value1, value2, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNumNotBetween(String value1, String value2) {
            addCriterion("coupons_num not between", value1, value2, "couponsNum");
            return (Criteria) this;
        }

        public Criteria andCouponsNameIsNull() {
            addCriterion("coupons_name is null");
            return (Criteria) this;
        }

        public Criteria andCouponsNameIsNotNull() {
            addCriterion("coupons_name is not null");
            return (Criteria) this;
        }

        public Criteria andCouponsNameEqualTo(String value) {
            addCriterion("coupons_name =", value, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameNotEqualTo(String value) {
            addCriterion("coupons_name <>", value, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameGreaterThan(String value) {
            addCriterion("coupons_name >", value, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameGreaterThanOrEqualTo(String value) {
            addCriterion("coupons_name >=", value, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameLessThan(String value) {
            addCriterion("coupons_name <", value, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameLessThanOrEqualTo(String value) {
            addCriterion("coupons_name <=", value, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameLike(String value) {
            addCriterion("coupons_name like", value, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameNotLike(String value) {
            addCriterion("coupons_name not like", value, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameIn(List<String> values) {
            addCriterion("coupons_name in", values, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameNotIn(List<String> values) {
            addCriterion("coupons_name not in", values, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameBetween(String value1, String value2) {
            addCriterion("coupons_name between", value1, value2, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsNameNotBetween(String value1, String value2) {
            addCriterion("coupons_name not between", value1, value2, "couponsName");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredIsNull() {
            addCriterion("coupons_required is null");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredIsNotNull() {
            addCriterion("coupons_required is not null");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredEqualTo(String value) {
            addCriterion("coupons_required =", value, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredNotEqualTo(String value) {
            addCriterion("coupons_required <>", value, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredGreaterThan(String value) {
            addCriterion("coupons_required >", value, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredGreaterThanOrEqualTo(String value) {
            addCriterion("coupons_required >=", value, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredLessThan(String value) {
            addCriterion("coupons_required <", value, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredLessThanOrEqualTo(String value) {
            addCriterion("coupons_required <=", value, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredLike(String value) {
            addCriterion("coupons_required like", value, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredNotLike(String value) {
            addCriterion("coupons_required not like", value, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredIn(List<String> values) {
            addCriterion("coupons_required in", values, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredNotIn(List<String> values) {
            addCriterion("coupons_required not in", values, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredBetween(String value1, String value2) {
            addCriterion("coupons_required between", value1, value2, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsRequiredNotBetween(String value1, String value2) {
            addCriterion("coupons_required not between", value1, value2, "couponsRequired");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceIsNull() {
            addCriterion("coupons_price is null");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceIsNotNull() {
            addCriterion("coupons_price is not null");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceEqualTo(Integer value) {
            addCriterion("coupons_price =", value, "couponsPrice");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceNotEqualTo(Integer value) {
            addCriterion("coupons_price <>", value, "couponsPrice");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceGreaterThan(Integer value) {
            addCriterion("coupons_price >", value, "couponsPrice");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceGreaterThanOrEqualTo(Integer value) {
            addCriterion("coupons_price >=", value, "couponsPrice");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceLessThan(Integer value) {
            addCriterion("coupons_price <", value, "couponsPrice");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceLessThanOrEqualTo(Integer value) {
            addCriterion("coupons_price <=", value, "couponsPrice");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceIn(List<Integer> values) {
            addCriterion("coupons_price in", values, "couponsPrice");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceNotIn(List<Integer> values) {
            addCriterion("coupons_price not in", values, "couponsPrice");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceBetween(Integer value1, Integer value2) {
            addCriterion("coupons_price between", value1, value2, "couponsPrice");
            return (Criteria) this;
        }

        public Criteria andCouponsPriceNotBetween(Integer value1, Integer value2) {
            addCriterion("coupons_price not between", value1, value2, "couponsPrice");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}